<?php 
$count = 0;
foreach ($nc as $n) {
    if($n['cerrada'] == 0 && $n['estado'] == 1 && $n['derivada']['aprueba'] == $session['SID']) {
        $count++;
    }
}
?>
<?php if($count > 0) { ?>
<table class="table table-striped">
    <thead>
        <tr>
            <th>#</th>
            <th>Descripci&oacute;n</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($nc as $n) { ?>
        <?php if($n['cerrada'] == 0 && $n['estado'] == 1 && $n['derivada']['aprueba'] == $session['SID']) { ?>
        <tr>
            <td><?=$n['idnc']?></td>
            <td><a href="/aprobacion/crear/<?=$n['idnc']?>"><?=$n['descripcion']?></a></td>
        </tr>
        <?php } ?>
        <?php } ?>
    </tbody>
</table>
<?php } else { ?>
<div class="alert alert-success"><h4><strong>No hay NC Pendientes de Aprobaci&oacute;n</strong></h4></div>
<?php } ?>
